<!DOCTYPE>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
 <link href="__PUBLIC__/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="__PUBLIC__/css/style.css"/>       
    <link href="__PUBLIC__/assets/css/codemirror.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/assets/css/ace.min.css" />
    <link rel="stylesheet" href="__PUBLIC__/font/css/font-awesome.min.css" />
        <!--[if lte IE 8]>
		  <link rel="__PUBLIC__/stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->
		<script src="__PUBLIC__/js/jquery-2.1.3.min.js"></script>
		<script src="__PUBLIC__/assets/js/typeahead-bs2.min.js"></script>   
    <script src="__PUBLIC__/js/lrtk.js" type="text/javascript" ></script>		
		<script src="__PUBLIC__/assets/js/jquery.dataTables.min.js"></script>
		<script src="__PUBLIC__/assets/js/jquery.dataTables.bootstrap.js"></script>
    <script src="__PUBLIC__/assets/js/bootstrap.min.js"></script>
    <script src="__PUBLIC__/assets/layer/layer.js" type="text/javascript" ></script>          
    <script src="__PUBLIC__/assets/dist/echarts.js"></script>
    <style>
      table{table-layout: fixed;}  
      td{
        text-overflow: ellipsis;
        white-space: nowrap; 
        overflow: hidden;  
      }  
    </style>
<title>文章管理</title>
</head>

<body>

      <!--列表样式-->
    <div class="grading_list">
         <div class="table_menu_list">
    <table class="table table-striped table-bordered table-hover" id="sample-table">
		<thead>
		 <tr>
				<th width="10%">ID</th>
				<th width="15%">标题</th>
				<th width="30%">内容</th>
				<th width="10%">作者</th>
				<th width="15%">添加时间</th>                
				<th width="20%">操作</th>
			</tr>
		</thead>
	<tbody>
  <foreach name="list" item="val">
		<tr id="user_com{$val.id}">
          <td>{$val.id}</td>
          <td>{$val.title}</td>
          <td>{$val.content}</td>         
          <td>{$val.author}</td>
          <td class="td-status">{:date('Y-m-d H:i:s',$val[addtime])}</td>
          <td class="td-manage">
          <a href="{:U('Admin/news/edit',['id'=>$val['id']])}" title="修改"  class="btn btn-xs btn-success"><i class="fa fa-check bigger-120"></i>修改</a> 
          <a title="删除" href="javascript:dele({$val['id']})"  class="btn btn-xs btn-warning" ><i class="fa fa-trash  bigger-120"></i>删除</a>
          </td>
		</tr>
    </foreach>
      </tbody>
	</table>
  <!-- 分页按钮  -->
    <div id="btnBox" align="right">{$show}</div>
   </div>
  </div>
   </div> 
  </div>
</div>
</body>
<script>
    //分页按钮
     $('#btnBox').children().children().unwrap().wrap('<li></li>').parent().wrapAll('<ul class="pagination"></ul>');
    // 给当前页码高亮显示
    $('#btnBox span').parent().addClass('active');
   function dele(id){
      if(confirm('确定要删除？')){
        window.location.href = "{:U('admin/news/delete')}?id="+id;
      }
   }
</script>
</html>
